<?php $this->load->view('common/header'); ?>
<?php $this->load->view('common/header-common'); ?>
<section id="resetpassword">
	<div class="container well">	
		<div class="row-fluid">
			<div class="span8 offset2">
				<form action="<?php echo site_url("/user/resetpassword");?>" method="post" id="form-resetpassword">
					<fieldset>
						<legend>重置密码</legend>
						<?php if (isset($error)) {?>
							<div class="alert">
		  						<a class="close" data-dismiss="alert">×</a>
		  						<strong>错误</strong> <?php echo $error;?>
							</div>
							<?php }?>
						<div class="form-group">
							<div class="control-group">
								<label for="newpassword" class="control-label">新密码</label>
								<div class="controls">
									<input type="password" class="input-medium" value="<?php echo set_value("newpassword");?>" name="newpassword" id="newpassword">
									<div class="help-inline"><?php echo form_error('newpassword');?></div>
								</div>
							</div>
							<div class="control-group">
								<label for="repassword" class="control-label">重复密码</label>
								<div class="controls">
									<input type="password" class="input-medium" value="<?php echo set_value("repassword");?>" name="repassword" id="repassword">
									<div class="help-inline"><?php echo form_error('repassword');?></div>
								</div>
							</div>
							<div class="form-actions">
								<button type="submit" class="btn btn-primary btn-medium">保存</button>
							</div>
						</div>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
</section>
<script type="text/javascript" src="<?php echo $this->config->item('public_path');?>js/bootstrapJS/bootstrap-validation.js"></script>
<script type="text/javascript">
	$(window).load(function(){
		$('#form-forgetemail').validation();
		$(".captcha").each(function(){
			var t = $(this);
			$(this).click(function(){
				t.attr("src","<?php echo site_url("/api/captcha")."?".rand();?>");
			});
		});
	});
</script>
<?php $this->load->view('common/footer'); ?>